#include "ztextbox.h"

ZTextBox::ZTextBox(QWidget *parent)
{
    this->setParent(parent);
    Maxlength = 64;
	bOneline = true;
}

void ZTextBox::OnTextChange()
{
    if (toPlainText().length() > Maxlength || (toPlainText().contains('\n')&&bOneline ))
        textCursor().deletePreviousChar();
}
